#ifndef _PACK_STRINGBUFFER_H_
#define _PACK_STRINGBUFFER_H_

#include "net/net.h"

namespace pack {

class StringBuffer : public net::IBuffer {
public:
    StringBuffer(const std::string& buffer);
    virtual ~StringBuffer();

public:
    virtual void Hold();
    virtual void Commit();
    virtual void Revert();

    virtual char* GetData();
    virtual uint32_t GetSize();

    virtual uint32_t Read(char* buf, uint32_t len);
    virtual uint32_t Write(char* buf, uint32_t len);
};

}

#endif
